import request from '/@/utils/request';

// 查询购物需要购买的暖心保订单列表
export function listHeart(query?: Object) {
  return request({
    url: '/module/product/order/warm/heart/list',
    method: 'get',
    params: query
  })
}

// 查询购物需要购买的暖心保订单详细
export function getHeart(id?: number) {
  return request({
    url: '/module/product/order/warm/heart/' + id,
    method: 'get'
  })
}

// 查询购物需要购买的暖心保订单详细
export function getHeartByOrderId(id?: number) {
  return request({
    url: '/module/product/order/warm/heart/getByOrderId/' + id,
    method: 'get'
  })
}


// 新增购物需要购买的暖心保订单
export function addHeart(data?: Object) {
  return request({
    url: '/module/product/order/warm/heart',
    method: 'post',
    data
  })
}

// 修改购物需要购买的暖心保订单
export function updateHeart(data?: Object) {
  return request({
    url: '/module/product/order/warm/heart',
    method: 'put',
    data
  })
}

// 删除购物需要购买的暖心保订单
export function delHeart(id?: number) {
  return request({
    url: '/module/product/order/warm/heart/' + id,
    method: 'delete'
  })
}

// 导出购物需要购买的暖心保订单
export function exportHeart(query?: Object) {
  return request({
    url: '/module/product/order/warm/heart/export',
    method: 'get',
    params: query
  })
}
